home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-22 | 2.5 KB | 98 lines | [TEXT/CWIE] |
- //========================================================================================
- // Release Version: $ ODF 2 $
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
-
- //================================================================================
- #include "Data.hpp"
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef CONTENT_H
- #include "Content.h"
- #endif
-
- #ifndef BINDING_K
- #include "Binding.k"
- #endif
-
- #ifndef FRAME_H
- #include "Frame.h"
- #endif
-
- // ----- Framework Layer -----
- #ifndef FWPRESEN_H
- #include "FWPresen.h" // FW_CPresentation
- #endif
-
- #ifndef FWABOUT_H
- #include "FWAbout.h" //::FW_About()
- #endif
-
- //==============================================================================
- #ifdef FW_BUILD_MAC
- #pragma segment Data
- #endif
-
- FW_DEFINE_AUTO(CDataPart)
-
- //==============================================================================
- CDataPart::CDataPart(ODPart* odPart)
- : FW_CPart(odPart, FW_gInstance, kPartInfoID),
- fPresentation(NULL),
- fPartContent(NULL)
- {
- }
-
- //--------------------------------------------------------------------------------
- CDataPart::~CDataPart()
- {
- }
-
- //--------------------------------------------------------------------------------
- void
- CDataPart::Initialize(Environment* ev, ODStorageUnit* storageUnit,
- FW_Boolean fromStorage) // Override
- {
- FW_CPart::Initialize(ev, storageUnit, fromStorage);
- FW_CSelection* selection = NULL;
- const ODType kMainPresentation = "Apple:Presentation:Data";
- const FW_Boolean kDefaultPresentation = true;
- fPresentation = RegisterPresentation(ev, kMainPresentation,
- kDefaultPresentation, selection);
- }
-
- //--------------------------------------------------------------------------------
- FW_Handled
- CDataPart::DoAbout(Environment* ev)
- {
- ::FW_About(ev, this, kAbout);
-
- return FW_kHandled;
- }
-
- //--------------------------------------------------------------------------------
- FW_CFrame*
- CDataPart::NewFrame(Environment* ev, ODFrame* odFrame,
- FW_CPresentation* presentation, FW_Boolean fromStorage) // Override
- {
- FW_UNUSED(fromStorage);
- return FW_NEW(CDataFrame, (ev, odFrame, presentation, fPartContent));
- }
-
- //------------------------------------------------------------------------------
- FW_CContent*
- CDataPart::NewPartContent(Environment* ev)
- {
- fPartContent = FW_NEW(CDataContent, (ev, this));
- return fPartContent;
- }
-
- //------------------------------------------------------------------------------
- void
- CDataPart::MyInvalidatePresentation(Environment* ev, FW_CRect& rect)
- {
- fPresentation->Invalidate(ev, rect);
- }
-